home *** CD-ROM | disk | FTP | other *** search
/ Network Supervisor's Toolkit / Network Supervisor's Toolkit.iso / patches / _winfile / lw42w2 / lwp_chk.bat < prev    next >
DOS Batch File  |  1996-07-10  |  14KB  |  483 lines

  1. @echo off
  2. rem $Id: lwp_chk.bat 1.3 95/04/01 15:52:58 frotz Exp $
  3. rem $Source: h:/prod/lwp/patches/rcs/lwp_chk.bat $
  4. rem $Locker:  $
  5.  
  6. echo.
  7. echo.    %0:  LAN WorkPlace installation checker.
  8. echo.    (C) Copyright 1995 Novell, Inc.  All Rights Reserved.
  9. echo.
  10.  
  11. rem
  12. rem NOTE:  This batch file expects at least 280 bytes of free environment space.
  13. rem
  14. rem ASSUMPTION: \WINDOWS and \NET are on the same drive.
  15. rem             (Shouldn't be harmful if they are on different drives.)
  16. rem
  17.  
  18. rem
  19. rem ALGORITHM:
  20. rem    [0] Handle command line parameters.
  21. rem    [1] Make sure the Environment is big enough.
  22. rem    [2] Create support batch files.
  23. rem    [3] Find specific named files for the current collection on the PATH.
  24. rem    [4] Make sure that the file found is where we expect it and not
  25. rem        upstream from where we expect it (for multiple versions of
  26. rem        LAN WorkPlace).
  27. rem    [5] Post notices for files that were found in non-standard places.
  28. rem    [6] Remove the support batch files.
  29.  
  30. rem
  31. rem NOTE: Certain lines have the redirection symbols (greater-than
  32. rem      and double-greater-than) close to the end of the text.
  33. rem      Other lines have this moved off to the end of the line
  34. rem      for readability.  This is by design.  Those lines that
  35. rem      are less than readable are that way to avoid problems in
  36. rem      processing by COMMAND.COM (or your current shell).
  37. rem
  38. rem      DO NOT CHANGE THESE LINES.
  39. rem
  40.  
  41. rem
  42. rem VARIABLES:
  43. rem    _DRIVE    \NET directory tree drive.  Default: C:
  44. rem    _FILE    Current file to find on path.
  45. rem    _MSG    Message displayed when file is found.
  46. rem    _VRSN    Product Version (if we can determine it).
  47. rem    _PATH    Path where %_FILE% should be found.
  48. rem    _PTH    Path where %_FILE% was actually found.
  49. rem    _FOUND    Flag indicating that the file has been found.
  50. rem    _TYPE    Type of file that we're looking for.
  51. rem
  52.  
  53. set me=%0
  54. if  (%1)==()    echo Recursing: %me% 3 A B C D L K T W X I BAT P 
  55. if  (%1)==()    %me% 3 A B C D L K T W X I BAT P 
  56. if  (%1)==(-h)    goto USAGE
  57. if  (%1)==(-H)    goto USAGE
  58. if  (%1)==(-?)    goto USAGE
  59. if  (%1)==(/h)    goto USAGE
  60. if  (%1)==(/H)    goto USAGE
  61. if  (%1)==(/?)    goto USAGE
  62. if  (%1)==(?)    goto USAGE
  63.  
  64. set _msg=00000
  65. set _drive=1234567890123456789012345678901234567890> nul
  66. set _file=1234567890123456789012345678901234567890> nul
  67. set _pth=1234567890123456789012345678901234567890> nul
  68. set _vrsn=1234567890123456789012345678901234567890> nul
  69. set _path=1234567890123456789012345678901234567890> nul
  70. if  (%_drive%)==(1234567890123456789012345678901234567890)    set _msg=10000
  71. if  (%_file%)==(1234567890123456789012345678901234567890)    set _msg=11000
  72. if  (%_pth%)==(1234567890123456789012345678901234567890)    set _msg=11100
  73. if  (%_path%)==(1234567890123456789012345678901234567890)    set _msg=11110
  74. if  (%_vrsn%)==(1234567890123456789012345678901234567890)    set _msg=11111
  75. if  (%_msg%)==(11111) goto BEGIN
  76. goto ENVIRONMENT
  77.  
  78.  
  79.  
  80.  
  81. :USAGE
  82. echo usage:
  83. echo %me% [-h] [drive:] [3] [A] [B] [C] [D] [L] [K] [T] [W] [X] [I] [P] [BAT]
  84. echo where:
  85. echo    -h    - Displays this screen
  86. echo    drive:    - the drive letter where \NET\BIN was installed on.
  87. echo    3    - 3270 support identification
  88. echo    A    - DOS application identification
  89. echo    B    - WWW Browser identification
  90. echo    C    - NFS Client support identification
  91. echo    D    - Serial support identification
  92. echo    L    - NLM identification
  93. echo    K    - Toolkit identification
  94. echo    T    - Protocol Stack identification
  95. echo    W    - Windows support identification
  96. echo    V    - VLM / NETX / IPXODI / LSL 
  97. echo    X    - X/Server support identification
  98. echo    I    - .INI or .CFG identification
  99. echo    BAT    - Standard network batch identification
  100. echo    P    - patch signature identification
  101. echo.
  102. echo Invoke %me% with one or more of the parameters to identify the
  103. echo current version information for selected modules.
  104. echo.
  105. echo NOTE: %me% calls LWP_LOG.BAT.  This file must be on the path (or in
  106. echo the current directory).
  107. goto END
  108.  
  109.  
  110.  
  111.  
  112. :ENVIRONMENT
  113. rem
  114. rem    We're in trouble.  Post an error and quit.
  115. rem
  116. if  (%_msg%)==()      echo ERROR: You have less than 11 bytes of free environment space.
  117. if  (%_msg%)==(00000) echo ERROR: You have less than 70 bytes of free environment space.
  118. if  (%_msg%)==(10000) echo ERROR: You have less than 130 bytes of free environment space.
  119. if  (%_msg%)==(11000) echo ERROR: You have less than 180 bytes of free environment space.
  120. if  (%_msg%)==(11100) echo ERROR: You have less than 230 bytes of free environment space.
  121. if  (%_msg%)==(11110) echo ERROR: You have less than 280 bytes of free environment space.
  122. echo SUGGESTION: Make sure that you have at least 2048 bytes of environment space.
  123. echo For example: CONFIG.SYS: SHELL=C:\COMMAND.COM /E:2048 /P
  124. goto end
  125.  
  126.  
  127.  
  128.  
  129. :BEGIN
  130. rem
  131. rem    Undo the environment size check...
  132. rem
  133. set _drive=
  134. set _file=
  135. set _pth=
  136. set _vrsn=
  137. set _path=
  138. set _found=
  139. set _type=
  140. set _msg=
  141.  
  142. rem
  143. rem    Make sure that we handle our [potentially] recursive call correctly.
  144. rem
  145. if  exist %1\nul    set _drive=%1
  146. if  exist %1\nul    shift
  147. if  (%1)==()        echo Recursing: %me% 3 A B C D L K T W X I BAT P
  148. if  (%1)==()        %me% 3 A B C D L K T W X I BAT P
  149. if  (%_drive%)==()    set _drive=C:
  150. if  exist %temp%\lwp.log    del %temp%\lwp.log
  151.  
  152.  
  153.  
  154.  
  155. echo %me%: Temporarily creating %temp%\_LWPFIND.BAT
  156. rem
  157. rem    Create _LWPFIND.BAT.  (Find the file on the PATH)
  158. rem
  159. echo set _found=>%temp%\_lwpfind.bat
  160. echo set _pth=>>%temp%\_lwpfind.bat
  161. echo :top                        >>%temp%\_lwpfind.bat
  162. echo if  (%%1)==()        goto end        >>%temp%\_lwpfind.bat
  163. echo if  exist %%1\%%_file%%    goto found        >>%temp%\_lwpfind.bat
  164. echo shift                        >>%temp%\_lwpfind.bat
  165. echo goto top                        >>%temp%\_lwpfind.bat
  166. echo :found                        >>%temp%\_lwpfind.bat
  167. echo set _pth=%%1>>%temp%\_lwpfind.bat
  168. echo call lwp_log.bat %%1 %%_file%%            >>%temp%\_lwpfind.bat
  169. echo set _found=1>>%temp%\_lwpfind.bat
  170. echo shift                        >>%temp%\_lwpfind.bat
  171. echo goto top                        >>%temp%\_lwpfind.bat
  172. echo :end                        >>%temp%\_lwpfind.bat
  173. echo if  (%%_found%%)==() call lwp_log.bat %%_drive%%%%_path%% %%_file%%>>%temp%\_lwpfind.bat
  174.  
  175.  
  176.  
  177.  
  178. echo %me%: Temporarily creating %temp%\_LWPFILE.BAT
  179. rem
  180. rem    Create _LWPFILE.BAT.  (Handle indirection for PATH)
  181. rem
  182. echo set _file=%%1>%temp%\_lwpfile.bat
  183. echo set _path=%%2>>%temp%\_lwpfile.bat
  184. echo set _msg=LAN WorkPlace >>%temp%\_lwpfile.bat
  185. echo if  (%%_type%%)==(3) set _msg=%%_msg%%%%_vrsn%% 3270 support file found:>>%temp%\_lwpfile.bat
  186. echo if  (%%_type%%)==(A) set _msg=%%_msg%%%%_vrsn%% file found:>>%temp%\_lwpfile.bat
  187. echo if  (%%_type%%)==(B) set _msg=%%_msg%%%%_vrsn%% WWW Browser file found:>>%temp%\_lwpfile.bat
  188. echo if  (%%_type%%)==(C) set _msg=%%_msg%%%%_vrsn%% NFS Client support file found:>>%temp%\_lwpfile.bat
  189. echo if  (%%_type%%)==(D) set _msg=%%_msg%%%%_vrsn%% Serial support file found:>>%temp%\_lwpfile.bat
  190. echo if  (%%_type%%)==(L) set _msg=%%_msg%%%%_vrsn%% NLM file found:>>%temp%\_lwpfile.bat
  191. echo if  (%%_type%%)==(K) set _msg=%%_msg%%%%_vrsn%% Toolkit file found:>>%temp%\_lwpfile.bat
  192. echo if  (%%_type%%)==(T) set _msg=%%_msg%%%%_vrsn%% Protocol Stack file found:>>%temp%\_lwpfile.bat
  193. echo if  (%%_type%%)==(W) set _msg=%%_msg%%%%_vrsn%% Windows support file found:>>%temp%\_lwpfile.bat
  194. echo if  (%%_type%%)==(X) set _msg=%%_msg%%%%_vrsn%% X/Server support file found:>>%temp%\_lwpfile.bat
  195. echo if  (%%_type%%)==(I) set _msg=%%_msg%%%%_vrsn%% .INI / .CFG file found:>>%temp%\_lwpfile.bat
  196. echo if  (%%_type%%)==(BAT) set _msg=%%_msg%%%%_vrsn%% batch file found:>>%temp%\_lwpfile.bat
  197. echo if  (%%_type%%)==(P) set _msg=%%_msg%%%%_vrsn%% patch signature file found:>>%temp%\_lwpfile.bat
  198. echo if  (%%_type%%)==(0) set _msg=>>%temp%\_lwpfile.bat
  199. echo call %temp%\_lwpfind.bat %%path%%>>%temp%\_lwpfile.bat
  200.  
  201.  
  202.  
  203.  
  204. echo %me%: Determining installed LAN WorkPlace product version.
  205. rem
  206. rem    Determine LAN WorkPlace product version...
  207. rem
  208. set _vrsn=5
  209. set _type=0
  210. call %temp%\_lwpfile.bat LWPLPR.DRV    \NET\BIN
  211. if  (%_found%)==()    set _vrsn=4.2
  212.  
  213.  
  214.  
  215.  
  216. :TOP
  217. if  (%1)==()    goto VIEWLOG
  218. set _type=%1
  219. if  (%_type%)==(3)    goto TN3270
  220. if  (%_type%)==(a)    set _type=A
  221. if  (%_type%)==(b)    set _type=B
  222. if  (%_type%)==(c)    set _type=C
  223. if  (%_type%)==(d)    set _type=D
  224. if  (%_type%)==(l)    set _type=L
  225. if  (%_type%)==(k)    set _type=K
  226. if  (%_type%)==(t)    set _type=T
  227. if  (%_type%)==(v)    set _type=V
  228. if  (%_type%)==(w)    set _type=W
  229. if  (%_type%)==(x)    set _type=X
  230. if  (%_type%)==(i)    set _type=I
  231. if  (%_type%)==(bat)    set _type=BAT
  232. if  (%_type%)==(p)    set _type=P
  233.  
  234. if  (%_type%)==(3)    goto TN3270
  235. if  (%_type%)==(A)    goto A
  236. if  (%_type%)==(B)    goto B
  237. if  (%_type%)==(C)    goto C
  238. if  (%_type%)==(D)    goto D
  239. if  (%_type%)==(L)    goto L
  240. if  (%_type%)==(K)    goto K
  241. if  (%_type%)==(T)    goto T
  242. if  (%_type%)==(V)    goto V
  243. if  (%_type%)==(W)    goto W
  244. if  (%_type%)==(X)    goto X
  245. if  (%_type%)==(I)    goto I
  246. if  (%_type%)==(BAT)    goto BAT
  247. if  (%_type%)==(P)    goto P
  248. echo %me%: Unknown option [%1].  Try:  %me% -H
  249. shift
  250. goto TOP
  251.  
  252.  
  253.  
  254.  
  255. :A
  256. rem
  257. rem    Check the DOS applications
  258. rem
  259. call %temp%\_lwpfile.bat FTP.EXE    \NET\BIN
  260. call %temp%\_lwpfile.bat LPR.EXE    \NET\BIN
  261. call %temp%\_lwpfile.bat RCP.EXE    \NET\BIN
  262. call %temp%\_lwpfile.bat REXEC.EXE    \NET\BIN
  263. call %temp%\_lwpfile.bat RPR.EXE    \NET\BIN
  264. call %temp%\_lwpfile.bat RSH.EXE    \NET\BIN
  265. call %temp%\_lwpfile.bat TELAPI.EXE    \NET\BIN
  266. call %temp%\_lwpfile.bat TNVT220.EXE    \NET\BIN
  267. call %temp%\_lwpfile.bat XPC.EXE    \NET\BIN
  268. shift
  269. goto TOP
  270.  
  271.  
  272.  
  273. :W
  274. rem
  275. rem    Check the Windows Support .DLLs
  276. rem
  277. call %temp%\_lwpfile.bat TELNET.DLL    \NET\BIN
  278. call %temp%\_lwpfile.bat TERMAPI.DLL    \NET\BIN
  279. call %temp%\_lwpfile.bat WDOSFS.DLL    \NET\BIN
  280. call %temp%\_lwpfile.bat WFTPFS.DLL    \NET\BIN
  281. call %temp%\_lwpfile.bat FS.DLL        \NET\BIN
  282. call %temp%\_lwpfile.bat LWPICON.DLL    \NET\BIN
  283. call %temp%\_lwpfile.bat LWPUTIL.DLL    \NET\BIN
  284. call %temp%\_lwpfile.bat PRESENTR.EXE    \NET\BIN
  285. call %temp%\_lwpfile.bat RESOLVIP.EXE    \NET\BIN
  286. call %temp%\_lwpfile.bat SERVEFTP.EXE    \NET\BIN
  287. call %temp%\_lwpfile.bat RAPFILER.EXE    \NET\BIN
  288. shift
  289. goto TOP
  290.  
  291.  
  292.  
  293. :B
  294. rem
  295. rem    Check for the WWW Browser
  296. rem
  297. call %temp%\_lwpfile.bat NETSCAPE.EXE    \NET\BROWSER
  298. shift
  299. goto TOP
  300.  
  301.  
  302. :D
  303. rem
  304. rem    Check the Dialer Support...
  305. rem
  306. call %temp%\_lwpfile.bat ASYNC.DLL                \NET\BIN
  307. call %temp%\_lwpfile.bat MDMAPI.DLL                \NET\BIN
  308. call %temp%\_lwpfile.bat SLPAPI.DLL                \NET\BIN
  309. call %temp%\_lwpfile.bat DIALER.EXE                \NET\BIN
  310. call %temp%\_lwpfile.bat AIOMDMS.MDC                \NET\HSTACC
  311. if  (%_vrsn%)==(5)    call %temp%\_lwpfile.bat SLIP_PPP.COM    \NET\BIN
  312. if  (%_vrsn%)==(5)    call %temp%\_lwpfile.bat NESL.COM    \NWCLIENT
  313. if  (%_vrsn%)==(5)    call %temp%\_lwpfile.bat NCOMX.COM    \NWCLIENT
  314. if  (%_vrsn%)==(5)    call %temp%\_lwpfile.bat NWREMOTE.COM    \NWCLIENT
  315. if  (%_vrsn%)==(4.2)    call %temp%\_lwpfile.bat CONFIG.EXE    \NET\BIN
  316. shift
  317. goto TOP
  318.  
  319.  
  320.  
  321.  
  322. :T
  323. rem
  324. rem    Check the Protocol Stack files
  325. rem
  326. call %temp%\_lwpfile.bat IPTUNNEL.EXE    \NET\BIN
  327. call %temp%\_lwpfile.bat LWPCON.EXE    \NET\BIN
  328. call %temp%\_lwpfile.bat NOVASYNC.EXE    \NET\BIN
  329. call %temp%\_lwpfile.bat PING.EXE    \NET\BIN
  330. call %temp%\_lwpfile.bat TCPIP.EXE    \NET\BIN
  331. call %temp%\_lwpfile.bat RFCNBIOS.EXE    \NET\BIN
  332. call %temp%\_lwpfile.bat SNMP.EXE    \NET\BIN
  333. call %temp%\_lwpfile.bat VTCPIP.386    \NET\BIN
  334. call %temp%\_lwpfile.bat WINSOCK.DLL    \NET\BIN
  335. call %temp%\_lwpfile.bat WLIBSOCK.DLL    \NET\BIN
  336. rem
  337. rem    Just fall through to include the NetWare Client stuff as well.
  338. rem
  339.  
  340.  
  341.  
  342. :V
  343. rem
  344. rem    VLM Support Files
  345. rem
  346. call %temp%\_lwpfile.bat LSL.COM    \NWCLIENT
  347. call %temp%\_lwpfile.bat IPXODI.COM    \NWCLIENT
  348. call %temp%\_lwpfile.bat VLM.EXE    \NWCLIENT
  349. call %temp%\_lwpfile.bat NETX.EXE    \NWCLIENT
  350. shift
  351. goto TOP
  352.  
  353.  
  354.  
  355.  
  356. :TN3270
  357. rem
  358. rem    Check the LAN WorkPlace 3270 support 
  359. rem
  360. if  (%_vrsn%)==(5)    call %temp%\_lwpfile.bat ATMAPI.DLL    \NET\TN3270
  361. if  (%_vrsn%)==(4.2)    call %temp%\_lwpfile.bat WTEMUL.DLL    \NET\BIN
  362. if  (%_vrsn%)==(4.2)    call %temp%\_lwpfile.bat WTKEY.DLL    \NET\BIN
  363. if  (%_vrsn%)==(4.2)    call %temp%\_lwpfile.bat WTLIB.DLL    \NET\BIN
  364. if  (%_vrsn%)==(4.2)    call %temp%\_lwpfile.bat WTSESS.DLL    \NET\BIN
  365. if  (%_vrsn%)==(4.2)    call %temp%\_lwpfile.bat WTSNDRCV.DLL    \NET\BIN
  366. if  (%_vrsn%)==(4.2)    call %temp%\_lwpfile.bat WTTRANS.DLL    \NET\BIN
  367. if  (%_vrsn%)==(4.2)    call %temp%\_lwpfile.bat WT3270.EXE    \NET\BIN
  368. shift
  369. goto TOP
  370.  
  371.  
  372.  
  373. :C
  374. rem
  375. rem    Check the LAN WorkPlace NFS Client support 
  376. rem
  377. if  (%_vrsn%)==(5)    call %temp%\_lwpfile.bat ETHDEV.LWP    \NET\BIN
  378. if  (%_vrsn%)==(4.2)    call %temp%\_lwpfile.bat ETHDEV.LWP    \NFSCLNT
  379. shift
  380. goto TOP
  381.  
  382.  
  383.  
  384.  
  385. :I
  386. rem
  387. rem    Check the LAN WorkPlace .INI and .CFG file locations
  388. rem
  389. if  (%_vrsn%)==(5)    call %temp%\_lwpfile.bat LWP.INI    \WINDOWS
  390. if  (%_vrsn%)==(4.2)    call %temp%\_lwpfile.bat LWP.INI    \NET\HSTACC
  391.             call %temp%\_lwpfile.bat NET.CFG    \NWCLIENT
  392.             call %temp%\_lwpfile.bat SYSTEM.INI    \WINDOWS
  393.             call %temp%\_lwpfile.bat WIN.INI    \WINDOWS
  394. shift
  395. goto TOP
  396.  
  397.  
  398.  
  399.  
  400. :BAT
  401. rem
  402. rem    Check for batch files
  403. rem
  404. if  (%_vrsn%)==(5)    call %temp%\_lwpfile.bat STARTNET.BAT    \NET\BIN
  405. if  (%_vrsn%)==(4.2)    call %temp%\_lwpfile.bat LANWP.BAT    \NET\BIN
  406. if  (%_vrsn%)==(4.2)    call %temp%\_lwpfile.bat LANWP.BAT    \
  407. shift
  408. goto TOP
  409.  
  410.  
  411.  
  412. :P
  413. rem
  414. rem    Check for patches:
  415. rem
  416. call %temp%\_lwpfile.bat LWP42T.TXT    \NET\BIN
  417. call %temp%\_lwpfile.bat LWP42A.TXT    \NET\BIN
  418. call %temp%\_lwpfile.bat LWP42W.TXT    \NET\BIN
  419. call %temp%\_lwpfile.bat LWP42D.TXT    \NET\BIN
  420. call %temp%\_lwpfile.bat LWP423.TXT    \NET\BIN
  421. call %temp%\_lwpfile.bat LWP413.TXT    \NET\BIN
  422.  
  423. call %temp%\_lwpfile.bat LW42T2.TXT    \NET\BIN
  424. call %temp%\_lwpfile.bat LW42A2.TXT    \NET\BIN
  425. call %temp%\_lwpfile.bat LW42W2.TXT    \NET\BIN
  426. call %temp%\_lwpfile.bat LW42D3.TXT    \NET\BIN
  427. call %temp%\_lwpfile.bat LW4233.TXT    \NET\BIN
  428. call %temp%\_lwpfile.bat LW4132.TXT    \NET\BIN
  429. shift
  430. goto TOP
  431.  
  432.  
  433.  
  434.  
  435. :X
  436. rem
  437. rem    Look for X/Server.
  438. rem
  439. call %temp%\_lwpfile.bat X.EXE    \NET\BIN
  440. shift
  441. goto TOP
  442.  
  443.  
  444.  
  445.  
  446. rem
  447. rem    Sections not currently supported.
  448. rem
  449. :L
  450. :K
  451. shift
  452. goto TOP
  453.  
  454.  
  455.  
  456.  
  457. :VIEWLOG
  458. if  (%visual%)==()    if  exist %temp%\lwp.log    edit %temp%\lwp.log
  459. if  not (%visual%)==()    if  exist %temp%\lwp.log    %visual% %temp%\lwp.log
  460. echo.
  461. if      exist %temp%\lwp.log    echo %me%: Log file is located at: %temp%\lwp.log
  462. if  not exist %temp%\lwp.log    echo %me%: No files found.
  463.  
  464.  
  465.  
  466.  
  467. :END
  468. rem
  469. rem    Clean up the environment and exit.
  470. rem
  471. set _found=
  472. set _type=
  473. set _drive=
  474. set _file=
  475. set _path=
  476. set _pth=
  477. set _msg=
  478. set _vrsn=
  479. rem if  exist %temp%\_lwpfind.bat    del %temp%\_lwpfind.bat
  480. rem if  exist %temp%\_lwpfile.bat    del %temp%\_lwpfile.bat
  481. echo %me%: Done.
  482. set me=
  483.